﻿<!DOCTYPE html>

<html>
<head>
    <title>弹窗页面</title>
</head>
<body>
    <input id="txt6" type="text" name="name" value="回传 " />
    <div style="background:black;color:white;padding:5px;margin:15px auto;">
        //子页面关闭自身窗口操作
        parent.j.closeback(window.name);
    </div>
    <input id="btn6" type="button" name="name" value="传递值到父页面 并触发关闭按钮" />
</body>
</html>
<script type="text/javascript">
    document.getElementById("txt6").value += new Date().valueOf();

    document.getElementById("btn6").onclick = function () {
        parent.document.getElementById("txtPv").value = document.getElementById("txt6").value;

        //子页面关闭自身窗口操作：
        parent.j.closeback(window.name);
    }

</script>